
<app-common-page>

    <div class="login-form-body">
        <div class="login-form-body-left">
            <div class="login-logo">
                <img src="../../../../assets/img/login-page/LOGO.png" alt="">
            </div>
        </div>

        <div class="login-form-body-right">
            <form nz-form class="loginForm" [formGroup]="resetPwsForm" >
                <div class="loginForm-tab">
                    <h1>重置密码</h1>
                    <a routerLink="/pages/register">去注册</a>
                </div>
                <nz-form-item>
                    <nz-form-control [nzSpan]="24">
                        <nz-input-group >
                            <input nz-input placeholder="手机" formControlName="mobile" name="mobile" type="text" id="mobile" />
                        </nz-input-group>
                        <nz-form-explain *ngIf="resetPwsForm.get('mobile').dirty && resetPwsForm.get('mobile').errors">请填写正确手机号码</nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
                
                <nz-form-item>
                  <nz-form-control >
                    <nz-input-group [nzSuffix]="verifyCodeTemplate">
                        <input nz-input type="text" formControlName="verifyCode" name="verifyCode" placeholder="验证码" />
                    </nz-input-group>
                    <ng-template #verifyCodeTemplate>
                        <a (click)='toSendCode()' *ngIf='!sendCodeType'>获取验证码</a>
                        <a *ngIf='sendCodeType'>{{sendCodeNum}}秒</a>
                    </ng-template>
                    <nz-form-explain *ngIf="resetPwsForm.get('verifyCode').dirty && resetPwsForm.get('verifyCode').errors">请输入验证码</nz-form-explain>
                  </nz-form-control>
                </nz-form-item>
                
                <nz-form-item>
                    <nz-form-control [nzSpan]="24">
                        <nz-input-group  [nzPrefix]="newPwdLock">
                            <input nz-input formControlName="newPwd" name="newPwd" type="password" id="newPwd" placeholder="密码">
                        </nz-input-group>
                        <nz-form-explain *ngIf="resetPwsForm.get('newPwd').dirty && resetPwsForm.get('newPwd').errors">输入密码不正确</nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
    
                <nz-form-item>
                    <nz-form-control [nzSpan]="24">
                        <nz-input-group [nzPrefix]="newConfirmPwdLock">
                            <input nz-input formControlName="newConfirmPwd" name="newConfirmPwd" type="password" id="newConfirmPwd" placeholder="再输密码">
                        </nz-input-group>
                        <nz-form-explain *ngIf="resetPwsForm.get('newConfirmPwd').dirty && resetPwsForm.get('newConfirmPwd').errors">输入密码不正确</nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
    
                <nz-form-item >
                    <nz-form-control >
                        <button  nz-button [nzType]="'primary'" (click)="submit(resetPwsForm.value)" [disabled]="resetPwsForm.invalid">重置密码</button>
                    </nz-form-control>
                </nz-form-item>
    
            </form>
        </div>
    </div>

</app-common-page>